Examples
Notebooks
In the folder notebooks several notebooks, using Pluto.jl, for the simulation of GC-systems are available.
To use these notebooks Julia, v1.6 or above, must be installed and Pluto must be added:
julia> ]
(v1.7) pkg> add PlutoTo run Pluto, use the following commands:
julia> using Pluto
julia> Pluto.run()Pluto will open your browser. In the field Open from file the URL of a notebook or the path to a locally downloaded notebook can be insert and the notebook will open and load the necessary packages.
Overview of notebooks
simulation_conventional_GC.jl- simulation of a conventional GC-system (constant temperature, constant diameter and constant film thickness along the column) and outlet pressure as "vacuum" or "atmospheric", now with option of flow or pressure control and temperature program notation in the typical form used in commercial GC software (temperature levels, holding times and heating ramps)simulation_conventional_GC_load_2dbs.jl- simulation of a conventional GC-system (constant temperature, constant diameter and constant film thickness along the column) and loading of up to two different substance databases and simulation of the common substances with the same GC-system and comparing the result. Also, an option is given, to load measured retention times and compare these to the simulations. Same setting for programs as insimulation_conventional_GC.jlsimulation_example.jl- general example of simulation of a GC-system with optional thermal gradient (exponential/linear model of temperature change along the column) and constant diameter and constant film thickness along the column.simulation_example_input_gradient_function.jl- simulation of a GC-system with optional thermal gradient where the temperature change along the column is defined by a user-defined equation (cosine-function as example)
Simulation of measurements
Two measurements from [8] will be simulated and compared to the measured chromatograms. The n-alkanes from n-nonane (C9) to n-triacontane (C30) are separated in a conventional GC and a thermal gradient GC . The database with the thermodynamic parameters is Database_Leppert2020b.csv.
Conventional GC
The conventional GC program simulated here is Prog. D from [8], a temperature program with two heating ramps, constant inlet pressure and a flame ionization detector (FID, atmospheric outlet pressure).
The standard options are used. Only the option ng (non-gradient) is changed to true. Because the conventional GC does not use non-uniform temperature, diameter or film thickness, the model can be simplified and the calculation of the separation is faster.
opt = GasChromatographySimulator.Options(ng=true)GasChromatographySimulator.Options(OwrenZen5(), 1.0e-6, 0.001, "inlet", true, true, "Blumberg", "Pressure")The column is defined as:
col = GasChromatographySimulator.Column(11.18, 0.104e-3, 0.104e-6, "FS5ms", "H2")GasChromatographySimulator.Column(11.18, 0.000104, [0.000104], 1.04e-7, [1.04e-7], "FS5ms", "H2")The program is defined as:
prog_D = GasChromatographySimulator.Program([0.0, 60.0, 1680.0, 60.0, 360.0, 60.0], [40.0, 40.0, 180.0, 180.0, 300.0, 300.0], 411564.0*ones(6), 101300.0.*ones(6), col.L)GasChromatographySimulator.Program{GasChromatographySimulator.var"#gf#5"{Matrix{Float64}}}([0.0, 60.0, 1680.0, 60.0, 360.0, 60.0], [40.0, 40.0, 180.0, 180.0, 300.0, 300.0], [411564.0, 411564.0, 411564.0, 411564.0, 411564.0, 411564.0], [101300.0, 101300.0, 101300.0, 101300.0, 101300.0, 101300.0], GasChromatographySimulator.var"#gf#5"{Matrix{Float64}}([0.0 0.0 11.18 0.0; 0.0 0.0 11.18 0.0; … ; 0.0 0.0 11.18 0.0; 0.0 0.0 11.18 0.0]), [0.0 0.0 11.18 0.0; 0.0 0.0 11.18 0.0; … ; 0.0 0.0 11.18 0.0; 0.0 0.0 11.18 0.0], 11181×6 extrapolate(interpolate((0.0:0.001:11.18,::Vector{Float64}), ::Matrix{Float64}, Gridded(Linear())), Flat()) with element type Float64:
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
⋮ ⋮
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15, 6-element extrapolate(interpolate((::Vector{Float64},), ::Vector{Float64}, Gridded(Linear())), Flat()) with element type Float64:
411564.0
411564.0
411564.0
411564.0
411564.0
411564.0, 6-element extrapolate(interpolate((::Vector{Float64},), ::Vector{Float64}, Gridded(Linear())), Flat()) with element type Float64:
101300.0
101300.0
101300.0
101300.0
101300.0
101300.0)We want to use all solutes for the stationary phase FS5ms, which are in the database. We load the database into a dataframe:
db_dataframe = DataFrame(CSV.File("../../data/Database_Leppert2020b.csv", header=1, silencewarnings=true))22 rows × 11 columns
| Name | CAS | Phase | Tchar | thetachar | DeltaCp | phi0 | Source | Cat_1 | Cat_2 | Cat_3 | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| String3 | String15 | String7 | Float64 | Float64 | Float64 | Float64 | String15 | String7 | String7 | String7 | |
| 1 | C9 | 111-84-2 | FS5ms | 98.04 | 30.17 | 89.34 | 0.001 | Leppert2020b | alkane | alkanes | missing |
| 2 | C10 | 124-18-5 | FS5ms | 118.09 | 32.24 | 112.49 | 0.001 | Leppert2020b | alkane | Grob | alkanes |
| 3 | C11 | 1120-21-4 | FS5ms | 137.07 | 33.71 | 116.04 | 0.001 | Leppert2020b | alkane | Grob | alkanes |
| 4 | C12 | 112-40-3 | FS5ms | 154.78 | 34.92 | 121.44 | 0.001 | Leppert2020b | alkane | alkanes | missing |
| 5 | C13 | 629-50-5 | FS5ms | 171.32 | 35.93 | 125.62 | 0.001 | Leppert2020b | alkane | alkanes | missing |
| 6 | C14 | 629-59-4 | FS5ms | 186.83 | 36.76 | 126.76 | 0.001 | Leppert2020b | alkane | alkanes | missing |
| 7 | C15 | 629-62-9 | FS5ms | 201.25 | 37.39 | 129.62 | 0.001 | Leppert2020b | alkane | alkanes | missing |
| 8 | C16 | 544-76-3 | FS5ms | 215.1 | 38.46 | 142.18 | 0.001 | Leppert2020b | alkane | alkanes | missing |
| 9 | C17 | 629-78-7 | FS5ms | 227.91 | 38.95 | 145.36 | 0.001 | Leppert2020b | alkane | alkanes | missing |
| 10 | C18 | 593-45-3 | FS5ms | 240.1 | 39.58 | 153.29 | 0.001 | Leppert2020b | alkane | alkanes | missing |
| 11 | C19 | 629-92-5 | FS5ms | 251.8 | 40.21 | 159.47 | 0.001 | Leppert2020b | alkane | alkanes | missing |
| 12 | C20 | 112-95-8 | FS5ms | 262.81 | 40.67 | 164.99 | 0.001 | Leppert2020b | alkane | alkanes | missing |
| 13 | C21 | 629-94-7 | FS5ms | 273.39 | 41.43 | 179.47 | 0.001 | Leppert2020b | alkane | alkanes | missing |
| 14 | C22 | 629-97-0 | FS5ms | 283.55 | 41.89 | 183.35 | 0.001 | Leppert2020b | alkane | alkanes | missing |
| 15 | C23 | 638-67-5 | FS5ms | 293.11 | 42.25 | 188.99 | 0.001 | Leppert2020b | alkane | alkanes | missing |
| 16 | C24 | 646-31-1 | FS5ms | 302.05 | 42.21 | 188.53 | 0.001 | Leppert2020b | alkane | alkanes | missing |
| 17 | C25 | 629-99-2 | FS5ms | 310.67 | 42.26 | 189.51 | 0.001 | Leppert2020b | alkane | alkanes | missing |
| 18 | C26 | 630-1-3 | FS5ms | 320.42 | 44.16 | 216.77 | 0.001 | Leppert2020b | alkane | missing | missing |
| 19 | C27 | 593-49-7 | FS5ms | 326.62 | 41.9 | 184.17 | 0.001 | Leppert2020b | alkane | alkanes | missing |
| 20 | C28 | 630-2-4 | FS5ms | 334.19 | 41.82 | 183.91 | 0.001 | Leppert2020b | alkane | missing | missing |
| 21 | C29 | 630-3-5 | FS5ms | 341.4 | 41.67 | 183.07 | 0.001 | Leppert2020b | alkane | missing | missing |
| 22 | C30 | 638-68-6 | FS5ms | 348.39 | 41.57 | 183.28 | 0.001 | Leppert2020b | alkane | alkanes | missing |
and extract all the names of the substances with:
solutes = GasChromatographySimulator.all_solutes(col.sp, db_dataframe)22-element Vector{String}:
"C9"
"C10"
"C11"
"C12"
"C13"
"C14"
"C15"
"C16"
"C17"
"C18"
⋮
"C22"
"C23"
"C24"
"C25"
"C26"
"C27"
"C28"
"C29"
"C30"The data for all solutes is finally loaded with:
t₀ = zeros(length(solutes))
τ₀ = zeros(length(solutes))
sub = GasChromatographySimulator.load_solute_database(db_dataframe, col.sp, col.gas, solutes, t₀, τ₀)22-element Vector{GasChromatographySimulator.Substance}:
GasChromatographySimulator.Substance("C9", "111-84-2", 371.19, 30.17, 89.34, 0.001, "Leppert2020b, alkane, alkanes", 0.0001253206335721764, 0.0, 0.0)
GasChromatographySimulator.Substance("C10", "124-18-5", 391.24, 32.24, 112.49, 0.001, "Leppert2020b, alkane, Grob, alkanes", 0.00011884991852543487, 0.0, 0.0)
GasChromatographySimulator.Substance("C11", "1120-21-4", 410.21999999999997, 33.71, 116.04, 0.001, "Leppert2020b, alkane, Grob, alkanes", 0.00011323854999018596, 0.0, 0.0)
GasChromatographySimulator.Substance("C12", "112-40-3", 427.92999999999995, 34.92, 121.44, 0.001, "Leppert2020b, alkane, alkanes", 0.00010831148421185742, 0.0, 0.0)
GasChromatographySimulator.Substance("C13", "629-50-5", 444.46999999999997, 35.93, 125.62, 0.001, "Leppert2020b, alkane, alkanes", 0.00010393999972322901, 0.0, 0.0)
GasChromatographySimulator.Substance("C14", "629-59-4", 459.98, 36.76, 126.76, 0.001, "Leppert2020b, alkane, alkanes", 0.00010002700149772162, 0.0, 0.0)
GasChromatographySimulator.Substance("C15", "629-62-9", 474.4, 37.39, 129.62, 0.001, "Leppert2020b, alkane, alkanes", 9.64976601701651e-5, 0.0, 0.0)
GasChromatographySimulator.Substance("C16", "544-76-3", 488.25, 38.46, 142.18, 0.001, "Leppert2020b, alkane, alkanes", 9.329323536538124e-5, 0.0, 0.0)
GasChromatographySimulator.Substance("C17", "629-78-7", 501.05999999999995, 38.95, 145.36, 0.001, "Leppert2020b, alkane, alkanes", 9.036687565381776e-5, 0.0, 0.0)
GasChromatographySimulator.Substance("C18", "593-45-3", 513.25, 39.58, 153.29, 0.001, "Leppert2020b, alkane, alkanes", 8.768068754143736e-5, 0.0, 0.0)
⋮
GasChromatographySimulator.Substance("C22", "629-97-0", 556.7, 41.89, 183.35, 0.001, "Leppert2020b, alkane, alkanes", 7.879073502414208e-5, 0.0, 0.0)
GasChromatographySimulator.Substance("C23", "638-67-5", 566.26, 42.25, 188.99, 0.001, "Leppert2020b, alkane, alkanes", 7.693149436827684e-5, 0.0, 0.0)
GasChromatographySimulator.Substance("C24", "646-31-1", 575.2, 42.21, 188.53, 0.001, "Leppert2020b, alkane, alkanes", 7.518755251713027e-5, 0.0, 0.0)
GasChromatographySimulator.Substance("C25", "629-99-2", 583.8199999999999, 42.26, 189.51, 0.001, "Leppert2020b, alkane, alkanes", 7.354754525382887e-5, 0.0, 0.0)
GasChromatographySimulator.Substance("C26", "630-1-3", 593.5699999999999, 44.16, 216.77, 0.001, "Leppert2020b, alkane", 7.200161658208628e-5, 0.0, 0.0)
GasChromatographySimulator.Substance("C27", "593-49-7", 599.77, 41.9, 184.17, 0.001, "Leppert2020b, alkane, alkanes", 7.054117055654164e-5, 0.0, 0.0)
GasChromatographySimulator.Substance("C28", "630-2-4", 607.3399999999999, 41.82, 183.91, 0.001, "Leppert2020b, alkane", 6.915867131183108e-5, 0.0, 0.0)
GasChromatographySimulator.Substance("C29", "630-3-5", 614.55, 41.67, 183.07, 0.001, "Leppert2020b, alkane", 6.784748059430345e-5, 0.0, 0.0)
GasChromatographySimulator.Substance("C30", "638-68-6", 621.54, 41.57, 183.28, 0.001, "Leppert2020b, alkane, alkanes", 6.660172475097402e-5, 0.0, 0.0)The injection is assumed to be ideal with initial peak widths τ₀ of 0 seconds and occuring at the beginning of the temperature program (t₀ of 0 seconds).
The parameters are combined:
par = GasChromatographySimulator.Parameters(col, prog_D, sub, opt)GasChromatographySimulator.Parameters(GasChromatographySimulator.Column(11.18, 0.000104, [0.000104], 1.04e-7, [1.04e-7], "FS5ms", "H2"), GasChromatographySimulator.Program{GasChromatographySimulator.var"#gf#5"{Matrix{Float64}}}([0.0, 60.0, 1680.0, 60.0, 360.0, 60.0], [40.0, 40.0, 180.0, 180.0, 300.0, 300.0], [411564.0, 411564.0, 411564.0, 411564.0, 411564.0, 411564.0], [101300.0, 101300.0, 101300.0, 101300.0, 101300.0, 101300.0], GasChromatographySimulator.var"#gf#5"{Matrix{Float64}}([0.0 0.0 11.18 0.0; 0.0 0.0 11.18 0.0; … ; 0.0 0.0 11.18 0.0; 0.0 0.0 11.18 0.0]), [0.0 0.0 11.18 0.0; 0.0 0.0 11.18 0.0; … ; 0.0 0.0 11.18 0.0; 0.0 0.0 11.18 0.0], 11181×6 extrapolate(interpolate((0.0:0.001:11.18,::Vector{Float64}), ::Matrix{Float64}, Gridded(Linear())), Flat()) with element type Float64:
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
⋮ ⋮
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15
313.15 313.15 453.15 453.15 573.15 573.15, 6-element extrapolate(interpolate((::Vector{Float64},), ::Vector{Float64}, Gridded(Linear())), Flat()) with element type Float64:
411564.0
411564.0
411564.0
411564.0
411564.0
411564.0, 6-element extrapolate(interpolate((::Vector{Float64},), ::Vector{Float64}, Gridded(Linear())), Flat()) with element type Float64:
101300.0
101300.0
101300.0
101300.0
101300.0
101300.0), GasChromatographySimulator.Substance[GasChromatographySimulator.Substance("C9", "111-84-2", 371.19, 30.17, 89.34, 0.001, "Leppert2020b, alkane, alkanes", 0.0001253206335721764, 0.0, 0.0), GasChromatographySimulator.Substance("C10", "124-18-5", 391.24, 32.24, 112.49, 0.001, "Leppert2020b, alkane, Grob, alkanes", 0.00011884991852543487, 0.0, 0.0), GasChromatographySimulator.Substance("C11", "1120-21-4", 410.21999999999997, 33.71, 116.04, 0.001, "Leppert2020b, alkane, Grob, alkanes", 0.00011323854999018596, 0.0, 0.0), GasChromatographySimulator.Substance("C12", "112-40-3", 427.92999999999995, 34.92, 121.44, 0.001, "Leppert2020b, alkane, alkanes", 0.00010831148421185742, 0.0, 0.0), GasChromatographySimulator.Substance("C13", "629-50-5", 444.46999999999997, 35.93, 125.62, 0.001, "Leppert2020b, alkane, alkanes", 0.00010393999972322901, 0.0, 0.0), GasChromatographySimulator.Substance("C14", "629-59-4", 459.98, 36.76, 126.76, 0.001, "Leppert2020b, alkane, alkanes", 0.00010002700149772162, 0.0, 0.0), GasChromatographySimulator.Substance("C15", "629-62-9", 474.4, 37.39, 129.62, 0.001, "Leppert2020b, alkane, alkanes", 9.64976601701651e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C16", "544-76-3", 488.25, 38.46, 142.18, 0.001, "Leppert2020b, alkane, alkanes", 9.329323536538124e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C17", "629-78-7", 501.05999999999995, 38.95, 145.36, 0.001, "Leppert2020b, alkane, alkanes", 9.036687565381776e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C18", "593-45-3", 513.25, 39.58, 153.29, 0.001, "Leppert2020b, alkane, alkanes", 8.768068754143736e-5, 0.0, 0.0) … GasChromatographySimulator.Substance("C21", "629-94-7", 546.54, 41.43, 179.47, 0.001, "Leppert2020b, alkane, alkanes", 8.077845767414391e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C22", "629-97-0", 556.7, 41.89, 183.35, 0.001, "Leppert2020b, alkane, alkanes", 7.879073502414208e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C23", "638-67-5", 566.26, 42.25, 188.99, 0.001, "Leppert2020b, alkane, alkanes", 7.693149436827684e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C24", "646-31-1", 575.2, 42.21, 188.53, 0.001, "Leppert2020b, alkane, alkanes", 7.518755251713027e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C25", "629-99-2", 583.8199999999999, 42.26, 189.51, 0.001, "Leppert2020b, alkane, alkanes", 7.354754525382887e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C26", "630-1-3", 593.5699999999999, 44.16, 216.77, 0.001, "Leppert2020b, alkane", 7.200161658208628e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C27", "593-49-7", 599.77, 41.9, 184.17, 0.001, "Leppert2020b, alkane, alkanes", 7.054117055654164e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C28", "630-2-4", 607.3399999999999, 41.82, 183.91, 0.001, "Leppert2020b, alkane", 6.915867131183108e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C29", "630-3-5", 614.55, 41.67, 183.07, 0.001, "Leppert2020b, alkane", 6.784748059430345e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C30", "638-68-6", 621.54, 41.57, 183.28, 0.001, "Leppert2020b, alkane, alkanes", 6.660172475097402e-5, 0.0, 0.0)], GasChromatographySimulator.Options(OwrenZen5(), 1.0e-6, 0.001, "inlet", true, true, "Blumberg", "Pressure"))The temperature program and the pressure/flow program can be plotted:
p_flow = GasChromatographySimulator.plot_flow(par)
p_press = GasChromatographySimulator.plot_pressure(par)
p_temp = GasChromatographySimulator.plot_temperature(par)
l = @layout([a{0.65w} [b; c]])
p_TpF = plot(p_temp, p_press, p_flow, layout=l)
And the simulation is run:
peaklist, sol = GasChromatographySimulator.simulate(par)
peaklist22 rows × 9 columns
| Name | tR | τR | TR | σR | uR | kR | Res | Δs | |
|---|---|---|---|---|---|---|---|---|---|
| String | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | |
| 1 | C9 | 140.736 | 0.389365 | 46.728 | 0.108043 | 0.277485 | 8.15494 | 62.0615 | 251.3 |
| 2 | C10 | 260.067 | 0.572035 | 56.6723 | 0.111085 | 0.194193 | 11.8077 | 60.3035 | 241.968 |
| 3 | C11 | 412.8 | 0.694334 | 69.4 | 0.111529 | 0.160628 | 14.0838 | 57.6982 | 230.933 |
| 4 | C12 | 580.176 | 0.756106 | 83.348 | 0.110697 | 0.146405 | 15.0983 | 54.1223 | 216.517 |
| 5 | C13 | 747.111 | 0.786098 | 97.2593 | 0.1094 | 0.139168 | 15.4922 | 50.2939 | 201.185 |
| 6 | C14 | 907.119 | 0.804631 | 110.593 | 0.108069 | 0.134309 | 15.6749 | 47.6137 | 190.458 |
| 7 | C15 | 1061.4 | 0.815528 | 123.45 | 0.106795 | 0.130952 | 15.7157 | 45.0212 | 180.085 |
| 8 | C16 | 1208.71 | 0.820451 | 135.726 | 0.105629 | 0.128745 | 15.6462 | 42.3496 | 169.4 |
| 9 | C17 | 1348.33 | 0.827944 | 147.361 | 0.104652 | 0.1264 | 15.6276 | 40.2379 | 160.952 |
| 10 | C18 | 1481.96 | 0.832643 | 158.497 | 0.103787 | 0.124648 | 15.5575 | 37.8877 | 151.551 |
| 11 | C19 | 1608.62 | 0.838851 | 169.052 | 0.103062 | 0.122861 | 15.5183 | 36.125 | 144.5 |
| 12 | C20 | 1730.23 | 0.844286 | 179.186 | 0.102429 | 0.12132 | 15.4662 | 40.1499 | 161.572 |
| 13 | C21 | 1849.8 | 0.644716 | 196.599 | 0.102731 | 0.159343 | 11.2113 | 30.4644 | 123.538 |
| 14 | C22 | 1915.21 | 0.428977 | 218.405 | 0.101667 | 0.236998 | 6.95413 | 29.0921 | 116.678 |
| 15 | C23 | 1961.05 | 0.358729 | 233.682 | 0.100826 | 0.281064 | 5.56513 | 27.037 | 108.237 |
| 16 | C24 | 1998.01 | 0.324749 | 246.002 | 0.0994335 | 0.306186 | 4.92608 | 25.2133 | 100.886 |
| 17 | C25 | 2029.76 | 0.305047 | 256.588 | 0.0978042 | 0.32062 | 4.57987 | 23.8793 | 95.5247 |
| 18 | C26 | 2058.46 | 0.295771 | 266.153 | 0.0971876 | 0.328591 | 4.3767 | 22.1994 | 88.7995 |
| 19 | C27 | 2084.51 | 0.291112 | 274.838 | 0.0969698 | 0.333102 | 4.24481 | 21.1971 | 84.7895 |
| 20 | C28 | 2109.06 | 0.287879 | 283.02 | 0.0965487 | 0.335379 | 4.15533 | 20.1803 | 80.7212 |
| 21 | C29 | 2132.24 | 0.286462 | 290.747 | 0.0963638 | 0.336393 | 4.09026 | 19.3098 | 77.2394 |
| 22 | C30 | 2154.34 | 0.285686 | 298.112 | 0.0961542 | 0.336573 | 4.04139 | NaN | NaN |
The file Leppert2020b_measured_RT_progD.csv contains the retention times and peak widths (as standard deviations) from the measured chromatogram.
measurement_D = DataFrame(CSV.File("../../data/measurements/Leppert2020b_measured_RT_progD.csv", header=1, silencewarnings=true))
measurement_D[!, 2] = measurement_D[!, 2] .* 60.0 # conversion from min -> s
rename!(measurement_D, [:Name, :tR, :τR])22 rows × 3 columns
| Name | tR | τR | |
|---|---|---|---|
| String3 | Float64 | Float64 | |
| 1 | C9 | 151.02 | 0.452 |
| 2 | C10 | 273.54 | 0.654 |
| 3 | C11 | 428.88 | 0.801 |
| 4 | C12 | 596.28 | 0.872 |
| 5 | C13 | 763.08 | 0.918 |
| 6 | C14 | 923.88 | 0.926 |
| 7 | C15 | 1077.24 | 0.944 |
| 8 | C16 | 1223.22 | 0.936 |
| 9 | C17 | 1362.06 | 0.94 |
| 10 | C18 | 1494.18 | 0.951 |
| 11 | C19 | 1620.36 | 0.956 |
| 12 | C20 | 1741.08 | 0.988 |
| 13 | C21 | 1853.28 | 0.657 |
| 14 | C22 | 1914.18 | 0.466 |
| 15 | C23 | 1958.04 | 0.391 |
| 16 | C24 | 1993.92 | 0.38 |
| 17 | C25 | 2025.18 | 0.343 |
| 18 | C26 | 2053.44 | 0.333 |
| 19 | C27 | 2079.42 | 0.327 |
| 20 | C28 | 2103.9 | 0.311 |
| 21 | C29 | 2127.0 | 0.318 |
| 22 | C30 | 2149.2 | 0.306 |
The simulated and measured separations can be compared by comparing the peak lists:
compare = GasChromatographySimulator.compare_peaklist(measurement_D, peaklist)22 rows × 9 columns
| Name | tR1 | tR2 | ΔtR | rel_tR | τR1 | τR2 | ΔτR | rel_τR | |
|---|---|---|---|---|---|---|---|---|---|
| String3 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | |
| 1 | C9 | 151.02 | 140.736 | 10.2845 | 6.81002 | 0.452 | 0.389365 | 0.0626355 | 13.8574 |
| 2 | C10 | 273.54 | 260.067 | 13.4728 | 4.92534 | 0.654 | 0.572035 | 0.0819647 | 12.5328 |
| 3 | C11 | 428.88 | 412.8 | 16.0797 | 3.74923 | 0.801 | 0.694334 | 0.106666 | 13.3166 |
| 4 | C12 | 596.28 | 580.176 | 16.1041 | 2.70077 | 0.872 | 0.756106 | 0.115894 | 13.2906 |
| 5 | C13 | 763.08 | 747.111 | 15.9688 | 2.09268 | 0.918 | 0.786098 | 0.131902 | 14.3684 |
| 6 | C14 | 923.88 | 907.119 | 16.761 | 1.8142 | 0.926 | 0.804631 | 0.121369 | 13.1068 |
| 7 | C15 | 1077.24 | 1061.4 | 15.8375 | 1.47019 | 0.944 | 0.815528 | 0.128472 | 13.6094 |
| 8 | C16 | 1223.22 | 1208.71 | 14.51 | 1.18622 | 0.936 | 0.820451 | 0.115549 | 12.345 |
| 9 | C17 | 1362.06 | 1348.33 | 13.7323 | 1.0082 | 0.94 | 0.827944 | 0.112056 | 11.9209 |
| 10 | C18 | 1494.18 | 1481.96 | 12.2153 | 0.817528 | 0.951 | 0.832643 | 0.118357 | 12.4456 |
| 11 | C19 | 1620.36 | 1608.62 | 11.7373 | 0.724366 | 0.956 | 0.838851 | 0.117149 | 12.254 |
| 12 | C20 | 1741.08 | 1730.23 | 10.8507 | 0.623217 | 0.988 | 0.844286 | 0.143714 | 14.546 |
| 13 | C21 | 1853.28 | 1849.8 | 3.48419 | 0.188001 | 0.657 | 0.644716 | 0.0122839 | 1.8697 |
| 14 | C22 | 1914.18 | 1915.21 | -1.03465 | -0.0540518 | 0.466 | 0.428977 | 0.0370227 | 7.94478 |
| 15 | C23 | 1958.04 | 1961.05 | -3.00671 | -0.153557 | 0.391 | 0.358729 | 0.0322711 | 8.25348 |
| 16 | C24 | 1993.92 | 1998.01 | -4.08506 | -0.204876 | 0.38 | 0.324749 | 0.055251 | 14.5397 |
| 17 | C25 | 2025.18 | 2029.76 | -4.5835 | -0.226326 | 0.343 | 0.305047 | 0.037953 | 11.065 |
| 18 | C26 | 2053.44 | 2058.46 | -5.01769 | -0.244356 | 0.333 | 0.295771 | 0.0372289 | 11.1798 |
| 19 | C27 | 2079.42 | 2084.51 | -5.09458 | -0.245 | 0.327 | 0.291112 | 0.0358884 | 10.975 |
| 20 | C28 | 2103.9 | 2109.06 | -5.16049 | -0.245282 | 0.311 | 0.287879 | 0.0231208 | 7.43435 |
| 21 | C29 | 2127.0 | 2132.24 | -5.24121 | -0.246413 | 0.318 | 0.286462 | 0.0315379 | 9.91757 |
| 22 | C30 | 2149.2 | 2154.34 | -5.13739 | -0.239037 | 0.306 | 0.285686 | 0.0203141 | 6.63858 |
or by comparing the chromatograms:
chrom_D = DataFrame(CSV.File("../../data/measurements/Leppert2020b_measured_Chrom_progD.csv", header=1, silencewarnings=true))
p_chrom, t, chrom = GasChromatographySimulator.plot_chromatogram(peaklist, (0.0, round(chrom_D[end,1];sigdigits=2)); annotation=false, number=true, mirror=true, offset=0.0)
plot!(p_chrom, chrom_D[!,1], chrom_D[!,2].*400.0.+0.1)
ylims!(-1.6,1.6)
xlims!(0.0,round(chrom_D[end,1];sigdigits=2))
p_chrom
Thermal gradient GC
The following example of a thermal gradient GC is the example medium gradient from [8].
Standard options are used:
opt_tg = GasChromatographySimulator.Options()GasChromatographySimulator.Options(OwrenZen5(), 1.0e-6, 0.001, "inlet", true, false, "Blumberg", "Pressure")And the column is defined as:
col_tg = GasChromatographySimulator.Column(2.05, 0.104e-3, 0.104e-6, "FS5ms", "He")GasChromatographySimulator.Column(2.05, 0.000104, [0.000104], 1.04e-7, [1.04e-7], "FS5ms", "He")The program is taken from the measured temperatures and pressures during the GC run, stored in the file Leppert2020b_prog_settings_med_gradient_x90.csv:
prog_settings = DataFrame(CSV.File("../../data/measurements/Leppert2020b_prog_settings_med_gradient_x90.csv", header=1, silencewarnings=true))
# use only every 20th measurement
time = cumsum(prog_settings.Deltat)[1:20:end]
time_steps = Array{Float64}(undef, length(time))
for i=2:length(time)
time_steps[i] = time[i]-time[i-1]
end
time_steps[1] = 0.0
temp_steps = prog_settings.T[1:20:end]
ΔT_steps = prog_settings.DeltaT[1:20:end]
pin_steps = prog_settings.pinj[1:20:end].*1000.0 .+ 101300.0
pout_steps = prog_settings.pdet[1:20:end].*1000.0
α_steps = -3.0.*ones(length(ΔT_steps))
x₀_steps = zeros(length(ΔT_steps))
L₀_steps = col_tg.L.*ones(length(ΔT_steps))
prog_med_grad = GasChromatographySimulator.Program(time_steps, temp_steps, pin_steps, pout_steps, ΔT_steps, x₀_steps, L₀_steps, α_steps, "outlet", col_tg.L)GasChromatographySimulator.Program{GasChromatographySimulator.var"#gf#2"{String, Matrix{Float64}}}([0.0, 0.9200000000000003, 0.9100000000000007, 0.9199999999999986, 0.9199999999999995, 0.910000000000001, 0.9199999999999999, 0.9199999999999982, 0.9200000000000008, 0.9300000000000006 … 0.9199999999999875, 0.9100000000000108, 0.9200000000000017, 0.9099999999999966, 0.9200000000000017, 0.9099999999999966, 0.9200000000000017, 0.9099999999999966, 0.9099999999999966, 0.9200000000000017], [49.323, 48.954, 49.323, 49.077, 49.569, 49.446, 48.831, 49.323, 49.077, 49.077 … 63.099, 56.211, 51.414, 48.339, 46.74, 45.51, 44.895, 44.28, 43.911, 43.542], [354589.48, 354562.67000000004, 354589.48, 354571.61, 354607.32, 354598.4, 354553.72, 354589.48, 354571.61, 354571.61 … 355560.34, 355082.14, 354740.58, 354517.9, 354400.94, 354310.42000000004, 354264.98, 354219.43, 354192.04000000004, 354164.6], [230168.87, 230224.3, 230168.87, 230205.81999999998, 230131.96, 230150.41, 230242.79, 230168.87, 230205.81999999998, 230205.81999999998 … 228154.50999999998, 229148.40000000002, 229856.25, 230316.84999999998, 230558.51, 230745.38999999998, 230839.16, 230933.15000000002, 230989.65000000002, 231046.23], GasChromatographySimulator.var"#gf#2"{String, Matrix{Float64}}("outlet", [-2.829 0.0 2.05 -3.0; -2.46 0.0 2.05 -3.0; … ; -1.23 0.0 2.05 -3.0; -0.984 0.0 2.05 -3.0]), [-2.829 0.0 2.05 -3.0; -2.46 0.0 2.05 -3.0; … ; -1.23 0.0 2.05 -3.0; -0.984 0.0 2.05 -3.0], 2051×108 extrapolate(interpolate((0.0:0.001:2.05,::Vector{Float64}), ::Matrix{Float64}, Gridded(Linear())), Flat()) with element type Float64:
319.644 319.644 319.644 319.89 … 316.077 315.954 315.831 315.708
319.644 319.644 319.644 319.89 316.077 315.954 315.831 315.708
319.645 319.644 319.645 319.89 316.077 315.954 315.831 315.708
319.645 319.645 319.645 319.891 316.078 315.954 315.831 315.708
319.645 319.645 319.645 319.891 316.078 315.955 315.831 315.708
319.645 319.645 319.645 319.891 … 316.078 315.955 315.832 315.708
319.646 319.645 319.646 319.891 316.078 315.955 315.832 315.709
319.646 319.646 319.646 319.892 316.078 315.955 315.832 315.709
319.646 319.646 319.646 319.892 316.079 315.955 315.832 315.709
319.646 319.646 319.646 319.892 316.079 315.955 315.832 315.709
⋮ ⋱ ⋮
322.44 322.075 322.44 322.199 318.022 317.413 317.046 316.68
322.444 322.079 322.444 322.203 318.025 317.415 317.048 316.682
322.448 322.082 322.448 322.206 318.028 317.417 317.05 316.683
322.452 322.086 322.452 322.21 … 318.03 317.419 317.052 316.685
322.456 322.089 322.456 322.213 318.033 317.421 317.054 316.686
322.46 322.093 322.46 322.217 318.036 317.423 317.056 316.688
322.465 322.097 322.465 322.22 318.039 317.426 317.057 316.689
322.469 322.1 322.469 322.224 318.042 317.428 317.059 316.691
322.473 322.104 322.473 322.227 … 318.045 317.43 317.061 316.692, 108-element extrapolate(interpolate((::Vector{Float64},), ::Vector{Float64}, Gridded(Linear())), Flat()) with element type Float64:
354589.48
354562.67000000004
354589.48
354571.61
354607.32
354598.4
354553.72
354589.48
354571.61
354571.61
⋮
355082.14
354740.58
354517.9
354400.94
354310.42000000004
354264.98
354219.43
354192.04000000004
354164.6, 108-element extrapolate(interpolate((::Vector{Float64},), ::Vector{Float64}, Gridded(Linear())), Flat()) with element type Float64:
230168.87
230224.3
230168.87
230205.81999999998
230131.96
230150.41
230242.79
230168.87
230205.81999999998
230205.81999999998
⋮
229148.40000000002
229856.25
230316.84999999998
230558.51
230745.38999999998
230839.16
230933.15000000002
230989.65000000002
231046.23)The same solutes are used as in the previous example.
The parameters are combined:
par_tg = GasChromatographySimulator.Parameters(col_tg, prog_med_grad, sub, opt_tg)GasChromatographySimulator.Parameters(GasChromatographySimulator.Column(2.05, 0.000104, [0.000104], 1.04e-7, [1.04e-7], "FS5ms", "He"), GasChromatographySimulator.Program{GasChromatographySimulator.var"#gf#2"{String, Matrix{Float64}}}([0.0, 0.9200000000000003, 0.9100000000000007, 0.9199999999999986, 0.9199999999999995, 0.910000000000001, 0.9199999999999999, 0.9199999999999982, 0.9200000000000008, 0.9300000000000006 … 0.9199999999999875, 0.9100000000000108, 0.9200000000000017, 0.9099999999999966, 0.9200000000000017, 0.9099999999999966, 0.9200000000000017, 0.9099999999999966, 0.9099999999999966, 0.9200000000000017], [49.323, 48.954, 49.323, 49.077, 49.569, 49.446, 48.831, 49.323, 49.077, 49.077 … 63.099, 56.211, 51.414, 48.339, 46.74, 45.51, 44.895, 44.28, 43.911, 43.542], [354589.48, 354562.67000000004, 354589.48, 354571.61, 354607.32, 354598.4, 354553.72, 354589.48, 354571.61, 354571.61 … 355560.34, 355082.14, 354740.58, 354517.9, 354400.94, 354310.42000000004, 354264.98, 354219.43, 354192.04000000004, 354164.6], [230168.87, 230224.3, 230168.87, 230205.81999999998, 230131.96, 230150.41, 230242.79, 230168.87, 230205.81999999998, 230205.81999999998 … 228154.50999999998, 229148.40000000002, 229856.25, 230316.84999999998, 230558.51, 230745.38999999998, 230839.16, 230933.15000000002, 230989.65000000002, 231046.23], GasChromatographySimulator.var"#gf#2"{String, Matrix{Float64}}("outlet", [-2.829 0.0 2.05 -3.0; -2.46 0.0 2.05 -3.0; … ; -1.23 0.0 2.05 -3.0; -0.984 0.0 2.05 -3.0]), [-2.829 0.0 2.05 -3.0; -2.46 0.0 2.05 -3.0; … ; -1.23 0.0 2.05 -3.0; -0.984 0.0 2.05 -3.0], 2051×108 extrapolate(interpolate((0.0:0.001:2.05,::Vector{Float64}), ::Matrix{Float64}, Gridded(Linear())), Flat()) with element type Float64:
319.644 319.644 319.644 319.89 … 316.077 315.954 315.831 315.708
319.644 319.644 319.644 319.89 316.077 315.954 315.831 315.708
319.645 319.644 319.645 319.89 316.077 315.954 315.831 315.708
319.645 319.645 319.645 319.891 316.078 315.954 315.831 315.708
319.645 319.645 319.645 319.891 316.078 315.955 315.831 315.708
319.645 319.645 319.645 319.891 … 316.078 315.955 315.832 315.708
319.646 319.645 319.646 319.891 316.078 315.955 315.832 315.709
319.646 319.646 319.646 319.892 316.078 315.955 315.832 315.709
319.646 319.646 319.646 319.892 316.079 315.955 315.832 315.709
319.646 319.646 319.646 319.892 316.079 315.955 315.832 315.709
⋮ ⋱ ⋮
322.44 322.075 322.44 322.199 318.022 317.413 317.046 316.68
322.444 322.079 322.444 322.203 318.025 317.415 317.048 316.682
322.448 322.082 322.448 322.206 318.028 317.417 317.05 316.683
322.452 322.086 322.452 322.21 … 318.03 317.419 317.052 316.685
322.456 322.089 322.456 322.213 318.033 317.421 317.054 316.686
322.46 322.093 322.46 322.217 318.036 317.423 317.056 316.688
322.465 322.097 322.465 322.22 318.039 317.426 317.057 316.689
322.469 322.1 322.469 322.224 318.042 317.428 317.059 316.691
322.473 322.104 322.473 322.227 … 318.045 317.43 317.061 316.692, 108-element extrapolate(interpolate((::Vector{Float64},), ::Vector{Float64}, Gridded(Linear())), Flat()) with element type Float64:
354589.48
354562.67000000004
354589.48
354571.61
354607.32
354598.4
354553.72
354589.48
354571.61
354571.61
⋮
355082.14
354740.58
354517.9
354400.94
354310.42000000004
354264.98
354219.43
354192.04000000004
354164.6, 108-element extrapolate(interpolate((::Vector{Float64},), ::Vector{Float64}, Gridded(Linear())), Flat()) with element type Float64:
230168.87
230224.3
230168.87
230205.81999999998
230131.96
230150.41
230242.79
230168.87
230205.81999999998
230205.81999999998
⋮
229148.40000000002
229856.25
230316.84999999998
230558.51
230745.38999999998
230839.16
230933.15000000002
230989.65000000002
231046.23), GasChromatographySimulator.Substance[GasChromatographySimulator.Substance("C9", "111-84-2", 371.19, 30.17, 89.34, 0.001, "Leppert2020b, alkane, alkanes", 0.0001253206335721764, 0.0, 0.0), GasChromatographySimulator.Substance("C10", "124-18-5", 391.24, 32.24, 112.49, 0.001, "Leppert2020b, alkane, Grob, alkanes", 0.00011884991852543487, 0.0, 0.0), GasChromatographySimulator.Substance("C11", "1120-21-4", 410.21999999999997, 33.71, 116.04, 0.001, "Leppert2020b, alkane, Grob, alkanes", 0.00011323854999018596, 0.0, 0.0), GasChromatographySimulator.Substance("C12", "112-40-3", 427.92999999999995, 34.92, 121.44, 0.001, "Leppert2020b, alkane, alkanes", 0.00010831148421185742, 0.0, 0.0), GasChromatographySimulator.Substance("C13", "629-50-5", 444.46999999999997, 35.93, 125.62, 0.001, "Leppert2020b, alkane, alkanes", 0.00010393999972322901, 0.0, 0.0), GasChromatographySimulator.Substance("C14", "629-59-4", 459.98, 36.76, 126.76, 0.001, "Leppert2020b, alkane, alkanes", 0.00010002700149772162, 0.0, 0.0), GasChromatographySimulator.Substance("C15", "629-62-9", 474.4, 37.39, 129.62, 0.001, "Leppert2020b, alkane, alkanes", 9.64976601701651e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C16", "544-76-3", 488.25, 38.46, 142.18, 0.001, "Leppert2020b, alkane, alkanes", 9.329323536538124e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C17", "629-78-7", 501.05999999999995, 38.95, 145.36, 0.001, "Leppert2020b, alkane, alkanes", 9.036687565381776e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C18", "593-45-3", 513.25, 39.58, 153.29, 0.001, "Leppert2020b, alkane, alkanes", 8.768068754143736e-5, 0.0, 0.0) … GasChromatographySimulator.Substance("C21", "629-94-7", 546.54, 41.43, 179.47, 0.001, "Leppert2020b, alkane, alkanes", 8.077845767414391e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C22", "629-97-0", 556.7, 41.89, 183.35, 0.001, "Leppert2020b, alkane, alkanes", 7.879073502414208e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C23", "638-67-5", 566.26, 42.25, 188.99, 0.001, "Leppert2020b, alkane, alkanes", 7.693149436827684e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C24", "646-31-1", 575.2, 42.21, 188.53, 0.001, "Leppert2020b, alkane, alkanes", 7.518755251713027e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C25", "629-99-2", 583.8199999999999, 42.26, 189.51, 0.001, "Leppert2020b, alkane, alkanes", 7.354754525382887e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C26", "630-1-3", 593.5699999999999, 44.16, 216.77, 0.001, "Leppert2020b, alkane", 7.200161658208628e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C27", "593-49-7", 599.77, 41.9, 184.17, 0.001, "Leppert2020b, alkane, alkanes", 7.054117055654164e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C28", "630-2-4", 607.3399999999999, 41.82, 183.91, 0.001, "Leppert2020b, alkane", 6.915867131183108e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C29", "630-3-5", 614.55, 41.67, 183.07, 0.001, "Leppert2020b, alkane", 6.784748059430345e-5, 0.0, 0.0), GasChromatographySimulator.Substance("C30", "638-68-6", 621.54, 41.57, 183.28, 0.001, "Leppert2020b, alkane, alkanes", 6.660172475097402e-5, 0.0, 0.0)], GasChromatographySimulator.Options(OwrenZen5(), 1.0e-6, 0.001, "inlet", true, false, "Blumberg", "Pressure"))The temperature program and the pressure/flow program can be plotted:
p_flow_tg = GasChromatographySimulator.plot_flow(par_tg)
p_press_tg = GasChromatographySimulator.plot_pressure(par_tg)
p_temp_tg = GasChromatographySimulator.plot_temperature(par_tg)
l = @layout([a{0.65w} [b; c]])
p_TpF_tg = plot(p_temp_tg, p_press_tg, p_flow_tg, layout=l)
And the simulation is run:
peaklist_tg, sol_tg = GasChromatographySimulator.simulate(par_tg)
peaklist_tg22 rows × 9 columns
| Name | tR | τR | TR | σR | uR | kR | Res | Δs | |
|---|---|---|---|---|---|---|---|---|---|
| String | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | |
| 1 | C9 | 14.9798 | 0.049298 | 75.4821 | 0.0184568 | 0.374392 | 2.26514 | 22.3181 | 89.7806 |
| 2 | C10 | 18.8744 | 0.0379536 | 96.402 | 0.0145397 | 0.383092 | 2.08467 | 20.292 | 81.2319 |
| 3 | C11 | 21.8124 | 0.0344387 | 111.891 | 0.0120874 | 0.350983 | 2.28049 | 18.2754 | 73.112 |
| 4 | C12 | 24.2789 | 0.0330431 | 125.302 | 0.0104472 | 0.316169 | 2.57205 | 16.6262 | 66.5048 |
| 5 | C13 | 26.4775 | 0.0330775 | 136.986 | 0.00928411 | 0.280677 | 2.96166 | 15.3247 | 61.3002 |
| 6 | C14 | 28.5219 | 0.0336235 | 147.958 | 0.00843564 | 0.250885 | 3.3746 | 14.2376 | 56.9528 |
| 7 | C15 | 30.4589 | 0.0344016 | 158.152 | 0.00774671 | 0.225185 | 3.82227 | 13.2009 | 52.8076 |
| 8 | C16 | 32.3036 | 0.0354683 | 168.0 | 0.00727081 | 0.204994 | 4.24796 | 12.4354 | 49.7431 |
| 9 | C17 | 34.0856 | 0.0361809 | 177.572 | 0.00682457 | 0.188624 | 4.65651 | 11.6472 | 46.5915 |
| 10 | C18 | 35.7945 | 0.0371806 | 186.652 | 0.00649024 | 0.17456 | 5.06846 | 11.008 | 44.0348 |
| 11 | C19 | 37.4543 | 0.0382118 | 195.41 | 0.00621859 | 0.16274 | 5.47307 | 10.4097 | 41.6411 |
| 12 | C20 | 39.0657 | 0.0391839 | 204.039 | 0.00602491 | 0.15376 | 5.8255 | 9.82189 | 39.2898 |
| 13 | C21 | 40.6257 | 0.0402336 | 212.24 | 0.00586468 | 0.145766 | 6.17237 | 9.42483 | 37.7006 |
| 14 | C22 | 42.158 | 0.0410552 | 220.536 | 0.00576008 | 0.140301 | 6.43637 | 8.92051 | 35.6838 |
| 15 | C23 | 43.6411 | 0.0420741 | 228.468 | 0.00569515 | 0.13536 | 6.69318 | 8.60481 | 34.421 |
| 16 | C24 | 45.1073 | 0.0431222 | 236.073 | 0.00562064 | 0.130342 | 6.96522 | 8.22239 | 32.8898 |
| 17 | C25 | 46.5316 | 0.0434899 | 243.914 | 0.00557322 | 0.12815 | 7.08973 | 7.91605 | 31.6659 |
| 18 | C26 | 47.9264 | 0.0446066 | 251.299 | 0.00561367 | 0.125849 | 7.24165 | 7.57217 | 30.2892 |
| 19 | C27 | 49.2868 | 0.045225 | 258.434 | 0.0055668 | 0.123091 | 7.4193 | 7.34567 | 29.383 |
| 20 | C28 | 50.623 | 0.0457294 | 265.687 | 0.00559676 | 0.122388 | 7.47235 | 7.09978 | 28.3995 |
| 21 | C29 | 51.9303 | 0.0463357 | 272.711 | 0.005648 | 0.121893 | 7.51409 | 6.88469 | 27.5395 |
| 22 | C30 | 53.2182 | 0.0471955 | 279.412 | 0.00571122 | 0.121012 | 7.57716 | NaN | NaN |
The file Leppert2020b_measured_RT_med_gradient.csv contains the retention times and peak widths (as standard deviations) from the measured chromatogram.
measurement_tg = DataFrame(CSV.File("../../data/measurements/Leppert2020b_measured_RT_med_gradient.csv", header=1, silencewarnings=true))
measurement_tg[!, 3] = measurement_tg[!, 3] ./ 1000.0 # conversion from ms -> s
rename!(measurement_tg, [:Name, :tR, :τR])22 rows × 3 columns
| Name | tR | τR | |
|---|---|---|---|
| String3 | Float64 | Float64 | |
| 1 | C9 | 14.7683 | 0.0669811 |
| 2 | C10 | 18.2283 | 0.0565467 |
| 3 | C11 | 21.0283 | 0.0526464 |
| 4 | C12 | 23.5083 | 0.0609966 |
| 5 | C13 | 25.7683 | 0.0581621 |
| 6 | C14 | 27.8883 | 0.0571819 |
| 7 | C15 | 29.8883 | 0.0574451 |
| 8 | C16 | 31.8083 | 0.0573303 |
| 9 | C17 | 33.6683 | 0.0598955 |
| 10 | C18 | 35.4683 | 0.0616608 |
| 11 | C19 | 37.2283 | 0.0638519 |
| 12 | C20 | 38.9083 | 0.0636418 |
| 13 | C21 | 40.5483 | 0.0664711 |
| 14 | C22 | 42.1283 | 0.068909 |
| 15 | C23 | 43.6683 | 0.0718497 |
| 16 | C24 | 45.1483 | 0.0726997 |
| 17 | C25 | 46.5883 | 0.0772066 |
| 18 | C26 | 48.0283 | 0.0816995 |
| 19 | C27 | 49.4283 | 0.0847638 |
| 20 | C28 | 50.8283 | 0.0920254 |
| 21 | C29 | 52.2083 | 0.0987833 |
| 22 | C30 | 53.5483 | 0.110653 |
The simulated and measured separations can be compared by comparing the peak lists:
compare_tg = GasChromatographySimulator.compare_peaklist(measurement_tg, peaklist_tg)22 rows × 9 columns
| Name | tR1 | tR2 | ΔtR | rel_tR | τR1 | τR2 | ΔτR | rel_τR | |
|---|---|---|---|---|---|---|---|---|---|
| String3 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | |
| 1 | C9 | 14.7683 | 14.9798 | -0.211549 | -1.43246 | 0.0669811 | 0.049298 | 0.0176831 | 26.4001 |
| 2 | C10 | 18.2283 | 18.8744 | -0.646118 | -3.54459 | 0.0565467 | 0.0379536 | 0.0185931 | 32.881 |
| 3 | C11 | 21.0283 | 21.8124 | -0.784087 | -3.72873 | 0.0526464 | 0.0344387 | 0.0182077 | 34.5849 |
| 4 | C12 | 23.5083 | 24.2789 | -0.77061 | -3.27804 | 0.0609966 | 0.0330431 | 0.0279535 | 45.828 |
| 5 | C13 | 25.7683 | 26.4775 | -0.709279 | -2.75253 | 0.0581621 | 0.0330775 | 0.0250846 | 43.1288 |
| 6 | C14 | 27.8883 | 28.5219 | -0.633627 | -2.27202 | 0.0571819 | 0.0336235 | 0.0235584 | 41.199 |
| 7 | C15 | 29.8883 | 30.4589 | -0.570654 | -1.90929 | 0.0574451 | 0.0344016 | 0.0230435 | 40.114 |
| 8 | C16 | 31.8083 | 32.3036 | -0.495331 | -1.55724 | 0.0573303 | 0.0354683 | 0.021862 | 38.1333 |
| 9 | C17 | 33.6683 | 34.0856 | -0.41731 | -1.23948 | 0.0598955 | 0.0361809 | 0.0237146 | 39.5933 |
| 10 | C18 | 35.4683 | 35.7945 | -0.326207 | -0.919714 | 0.0616608 | 0.0371806 | 0.0244802 | 39.7014 |
| 11 | C19 | 37.2283 | 37.4543 | -0.226058 | -0.607221 | 0.0638519 | 0.0382118 | 0.0256401 | 40.1556 |
| 12 | C20 | 38.9083 | 39.0657 | -0.157394 | -0.404526 | 0.0636418 | 0.0391839 | 0.0244579 | 38.4306 |
| 13 | C21 | 40.5483 | 40.6257 | -0.077454 | -0.191017 | 0.0664711 | 0.0402336 | 0.0262375 | 39.472 |
| 14 | C22 | 42.1283 | 42.158 | -0.0297202 | -0.070547 | 0.068909 | 0.0410552 | 0.0278539 | 40.4212 |
| 15 | C23 | 43.6683 | 43.6411 | 0.0271696 | 0.0622181 | 0.0718497 | 0.0420741 | 0.0297756 | 41.4415 |
| 16 | C24 | 45.1483 | 45.1073 | 0.0409738 | 0.090754 | 0.0726997 | 0.0431222 | 0.0295775 | 40.6845 |
| 17 | C25 | 46.5883 | 46.5316 | 0.0566581 | 0.121614 | 0.0772066 | 0.0434899 | 0.0337167 | 43.6708 |
| 18 | C26 | 48.0283 | 47.9264 | 0.101906 | 0.212179 | 0.0816995 | 0.0446066 | 0.0370929 | 45.4016 |
| 19 | C27 | 49.4283 | 49.2868 | 0.141477 | 0.286226 | 0.0847638 | 0.045225 | 0.0395389 | 46.6459 |
| 20 | C28 | 50.8283 | 50.623 | 0.205224 | 0.40376 | 0.0920254 | 0.0457294 | 0.0462959 | 50.3078 |
| 21 | C29 | 52.2083 | 51.9303 | 0.27794 | 0.532367 | 0.0987833 | 0.0463357 | 0.0524475 | 53.0935 |
| 22 | C30 | 53.5483 | 53.2182 | 0.330074 | 0.616404 | 0.110653 | 0.0471955 | 0.0634578 | 57.3483 |
or by comparing the chromatograms:
chrom_tg = DataFrame(CSV.File("../../data/measurements/Leppert2020b_measured_Chrom_med_gradient_x90.csv", header=1, silencewarnings=true))
p_chrom_tg, t_, chrom_ = GasChromatographySimulator.plot_chromatogram(peaklist_tg, (0.0, 55.0); annotation=false, number=true, mirror=true, offset=0.0)
plot!(p_chrom_tg, chrom_tg[!,1], chrom_tg[!,2].*8e-5)
ylims!(-13,13)
xlims!(0.0,55.0)
p_chrom_tg